@(title:String, project:String, params:Map[String, String], breadcrumbs:Breadcrumbs, page:Option[String] = Some("dashboard"))

@default(title, project, params, page){
  <!-- stylesheet -->
  <script src="" type="text/javascript" charset="utf-8"></script>
  <link rel="stylesheet" href="@routes.Assets.at("ipython/style/style.min.css")" type="text/css"/>
  <link rel="stylesheet" href="@routes.Assets.at("ipython/components/codemirror/lib/codemirror.css")">
  <link rel="stylesheet" href="@routes.Assets.at("stylesheets/user_custom.css")" type="text/css" />
 }{
  <!-- meta -->

} {
  <!-- headercontainer -->
} {
  <!-- header -->
} {
  <!-- site -->


  <div id="ipython-main-app" class="container">
    <div id="tab_content" class="tabbable">
      <ul id="tabs" class="nav nav-tabs">
        <li class="active"><a href="#notebooks" data-toggle="tab">Files</a></li>
        @if(!_root_.utils.AppUtils.notebookConfig.viewer) {
          @if(_root_.utils.SbtProjectGenUtils.isConfigured) {
            <li><a href="#projects" data-toggle="tab">Generated SBT Projects</a></li>
          }
          <li><a href="#running" data-toggle="tab">Running</a></li>
          <li><a href="#clusters" data-toggle="tab">Clusters</a></li>
        }
      </ul>
      <div class="tab-content">
        <div id="notebooks" class="tab-pane active">
          <div id="notebook_toolbar" class="row">
            <div class="col-sm-8 no-padding">
              @if(!_root_.utils.AppUtils.notebookConfig.viewer) {
                <form id='alternate_upload'  class='alternate_upload'>
                  <span id="notebook_list_info">
                  To import a notebook, drag the file onto the listing below or
                  <span class="input-overlay">
                  <input type="file" name="datafile" class="fileinput" multiple='multiple'>
                  click here.
                  </span>
                  </span>
                </form>
              }
            </div>
            <div class="col-sm-4 no-padding tree-buttons">
              <div class="pull-right">
                @if(!_root_.utils.AppUtils.notebookConfig.viewer) {
                  <div id="new-buttons" class="btn-group">
                    <button class="dropdown-toggle btn btn-default btn-xs" data-toggle="dropdown">
                    <span>New</span>
                    <span class="caret"></span>
                    </button>
                    <ul id="new-menu" class="dropdown-menu">
                      <!--<li role="presentation" id="new-file">
                        <a role="menuitem" tabindex="-1" href="#">Text File</a>
                      </li>-->
                      <li role="presentation" id="new-folder">
                        <a role="menuitem" tabindex="-1" href="#">Folder</a>
                      </li>
                      <!--
                      <li role="presentation" id="new-terminal">
                        <a role="menuitem" tabindex="-1" href="#">Terminal</a>
                      </li>
                      <li role="presentation" id="new-terminal-disabled" class="disabled">
                        <a role="menuitem" tabindex="-1" href="#">Terminals Unavailable</a>
                      </li>
                      -->
                      <li role="presentation" class="divider"></li>
                      <li role="presentation" class="dropdown-header" id="notebook-kernels">Notebooks</li>
                    </ul>
                  </div>
                }
                <div class="btn-group">
                    <button id="refresh_notebook_list" title="Refresh notebook list" class="btn btn-default btn-xs"><i class="fa fa-refresh"></i></button>
                </div>
              </div>
            </div>
          </div>
          <div id="notebook_list">
            <div id="notebook_list_header" class="row list_header">
              <div id="project_name">
                <ul class="breadcrumb">
                  <li><a href="@{breadcrumbs.home}"><i class="fa fa-home"></i></a></li>
                  @breadcrumbs.crumbs.map { crumb =>
                    <li><a href="@{crumb.url}">@{crumb.name}</a></li>
                  }
                </ul>
              </div>
            </div>
          </div>
        </div>

        @if(_root_.utils.SbtProjectGenUtils.isConfigured) {
          @home.projects()
        }

        <div id="running" class="tab-pane">
          <div id="running_toolbar" class="row">
            <div class="col-sm-8 no-padding">
              <span id="running_list_info">Currently running processes</span>
            </div>
            <div class="col-sm-4 no-padding tree-buttons">
              <span id="running_buttons" class="pull-right">
              <button id="refresh_running_list" title="Refresh running list" class="btn btn-default btn-xs"><i class="fa fa-refresh"></i></button>
              </span>
            </div>
          </div>
          <div class="panel-group" id="accordion" >
            <!--
            <div class="panel panel-default">
              <div class="panel-heading">
                <a data-toggle="collapse" data-target="#collapseOne" href="#">
                  Terminals
                </a>
              </div>
              <div id="collapseOne" class=" collapse in">
                <div class="panel-body">
                  <div id="terminal_list">
                    <div id="terminal_list_header" class="row list_header">
                      <div> There are no terminals running. </div>
                      <div> Terminals are unavailable. </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            -->
            <div class="panel panel-default">
              <div class="panel-heading">
                <a data-toggle="collapse" data-target="#collapseTwo" href="#">
                  Notebooks
                </a>
              </div>
              <div id="collapseTwo" class=" collapse in">
                <div class="panel-body">
                  <div id="running_list">
                    <div id="running_list_header" class="row list_header">
                      <div> There are no notebooks running. </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div id="clusters" class="tab-pane">
          <div id="cluster_toolbar" class="row">
            <div class="col-xs-8 no-padding">
              <span id="cluster_list_info">Spark clusters</span>
            </div>
            <div class="col-xs-4 no-padding tree-buttons">
              <span id="cluster_buttons" class="pull-right">
              <button id="refresh_add_cluster" title="Create configuration" class="btn btn-default btn-xs"><i class="fa fa-plus"></i></button>
              <button id="refresh_cluster_list" title="Refresh cluster list" class="btn btn-default btn-xs"><i class="fa fa-refresh"></i></button>
              </span>
            </div>
          </div>
          <div id="cluster_list">
            <div id="cluster_list_header" class="row list_header">
              <div class="profile_col col-xs-2">Profile</div>
              <div class="name_col col-xs-2" title="The name of the cluster">Name</div>
              <div class="local_repo_col col-xs-2">Local repo</div>
              <div class="repos_col col-xs-1">Remote repos</div>
              <div class="deps_col col-xs-1">Dependencies</div>
              <div class="imports_col col-xs-1">Imports</div>
              <div class="spark_conf_repo_col col-xs-2">Spark Conf</div>
              <div class="action_col col-xs-1">Action</div>
            </div>
          </div>
        </div>
      </div><!-- class:tab-content -->
    </div><!-- id:tab_content -->
  </div><!-- ipython-main-app  -->

}{
  <!-- script -->
  <script src="@routes.Assets.at("ipython/tree/js/main.js")" type="text/javascript" charset="utf-8"></script>
}
